package cn.dzh;


import cn.dzh.result.Result;
import cn.dzh.service.RolesService;
import cn.dzh.service.UsersService;
import com.alipay.sofa.runtime.api.annotation.SofaService;
import com.alipay.sofa.runtime.api.annotation.SofaServiceBinding;
import com.tonpower.sofarpc.facade.Authentication;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import pojo.entity.Users;

import javax.annotation.Resource;


/**
 * ClassName: CreateTokenController
 * Package: cn.dzh.controller
 */
@Slf4j
@Service
@SofaService(interfaceType = Authentication.class, uniqueId = "${service.unique.id}", bindings = { @SofaServiceBinding(bindingType = "bolt") })
public class AuthenticationImpl implements Authentication{
    @Resource
    private UsersService usersService;
    @Resource
    private RolesService rolesService;
    @Override
    public boolean authentication(String token, String url){
        return false;
    }

    @Override
    public Result login(Users user) {
        Result<Users> result = new Result<>();
        //result.setResult(user);
        log.info(" ",usersService);
        return result;
    }
}
